<template>
	<view>
		<view class="banner" v-if="flag">
			<!-- 轮播图 -->
			<swiper   class="swiper-box" :circular="true" :autoplay="true" :indicator-dots="true">
				<swiper-item v-if="flag" v-for="(item, index) in imageList" :key="index">
					<view class="swiper-item">
						<image :src="item" mode="aspectFill" :draggable="false" />
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="notice-title">
			{{this.banner.adviceTitle}}
		</view>
		<view class="auther-time">
			
			<view>
				<text style="font-size: 19rpx; color: slategray;">{{this.banner.adviceTime}}</text>
			</view>
		</view>
		<view class="article-meta" >
			<view >
			<mp-html :content="this.banner.adviceContent"/>
			</view>
		</view>
		<view class="">
			<view v-if="this.banner.replyStatus>0" >
				<view style="margin-top: 100rpx; margin-bottom: 20rpx; color: blue; font-size: 40rpx;" >
				 回复信息：
				</view>
				<view class="article-meta" >
						<view style="color: red; margin-left: 15rpx;" >
						<mp-html :content="this.banner.replyContent"/>
						</view>
				</view>
		</view>
		<view  v-if="this.banner.replyStatus==0">
			<view style="margin-top: 100rpx; margin-bottom: 20rpx; color: red; font-size: 40rpx; margin-left: 35px;" >
			 暂未回复
			</view>
		</view>
		</view>
	</view>
</template>
<script>

 import mpHtml from '@/components/mp-html/mp-html'
	export default {
		data() {
			return {
				imageList:[],
				sceneList: [],
				banner: [],
				flag:true,
			}
		},
		onLoad(option) {
			const item = JSON.parse(decodeURIComponent(option.item));
			console.log(item);
			this.banner = item;
			//详情标题
			uni.setNavigationBarTitle({
				title: "信息详情"
			});
		},
		methods: {},
		onShow() { 
		},
		created() {
			this.imageList=this.banner.advicePhoto.split(',')
			// console.log(this.imageList);
			if(this.imageList[0]=="") {
				this.flag = false
			}else {
				this.flag = true
			}
			console.log(this.flag);
		}
	}
</script>
<style>

	.article-meta {
		text-align: center;
	
		margin: 20px 20px 20px 20px;

		text-indent:30px;

	}
	page {
		background-color: #fff;
	}
	.swiper {
		height: 400rpx;
	}

	.swiper-box {
		height: 400rpx;
	}

	.swiper-item {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		justify-content: center;
		align-items: center;
		color: #fff;
		height: 400rpx;
		line-height: 300rpx;
	}

	.banner {
		height: 360upx;
		overflow: hidden;
		position: relative;
		background-color: #ccc;
	}
	.notice-title{
		font-weight: bold;
		font-size: 38rpx;
		margin-bottom: 16rpx;
		display: flex;
		justify-content: center;
		margin-top: 35rpx;
		margin-bottom: 35rpx;
	}
	.auther-time{
		display: flex;
		justify-content: center;
		margin-bottom: 15rpx;
	}
</style>
